Skip to main content

.gitignore File Documentation

Overview

The .gitignore file is used to specify intentionally untracked files that Git should ignore. Files already tracked by Git are not affected.

Contents

  • .vercel: Ignores the .vercel directory, typically used for Vercel deployments.
  • #amplify-do-not-edit-begin to #amplify-do-not-edit-end: Blocks for AWS Amplify configurations and logs.
  • build/, dist/: Ignores build and distribution directories.
  • node_modules/: Ignores Node.js dependencies.
  • Various AWS and Amplify configuration files.
  • .secret-*: Ignores files with sensitive information.
  • **.sample: Ignores sample files.

Best Practices

  • Regularly update to include new directories/files that should not be tracked.
  • Ensure sensitive information and large build directories are included to avoid unnecessary uploads to the repository.

This document is a template for the .gitignore file in the Next.js project.